package com.ruoyi.admin.mapper;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface DifyDataSourceMapper {

    public List<Map<String, Object>> getAllMessage(@Param("size") int pageSize,
                                                   @Param("num") int pageNum,
                                                   int userId,
                                                   @Param("query") String query,
                                                   @Param("startTime") String startTime,
                                                   @Param("endTime") String endTime);

    public int getCount(@Param("query") String query,
                        @Param("startTime") String startTime,
                        @Param("endTime") String endTime);

    List<Map<String, Object>> getMessage(@Param("conversation_id") String conversation_id);

    List<Map<String, Object>> getMessageNode(@Param("messageId") String messageId);

    List<Map<String, Object>> getContent(@Param("knowledgeIds") List<String> knowledgeIds);

    // 获取所有的对话记录
    List<Map<String, Object>> getAllUserMessageContent(@Param("token") String token, @Param("keywords") String keywords);

    // 获取对话记录
    List<Map<String, Object>> getDifyConversationMessage(@Param("token") String token, @Param("conversationId") String conversationId);

    // 获取对话记录2
    List<Map<String, Object>> getDifyConversationMessageByMessageId(@Param("token") String token, @Param("conversationId") String conversationId, @Param("messageId") String messageId);
}

